class InstallationsController < ApplicationController
  respond_to :html, :json, :xml
  def index
  end

  def show
  end

  def update
    @release = true
    if params[:test] and params[:test] == 'true'
      @release = false
    end
    if params[:name] == 'terminal'
      @terminals = TerminalVersion.where(release: @release).group_by(&:name)
      respond_to do |format|
        format.xml {render "installations/terminal"}
      end
    else
      @apps = AppVersion.where name: params[:name], release: @release
      respond_to do |format|
        format.xml {render "installations/app"}
      end
    end
    
  end
end
